package com.kaifamiao.service.impl;

import com.kaifamiao.dao.IAccountDao;
import com.kaifamiao.dao.impl.IAccountDaoImpl;
import com.kaifamiao.service.IAccountService;

/**
 * @author lucien-ma
 * @date 2021/8/19
 * @apiNote
 */
public class IAccountServiceImpl implements IAccountService {

    private IAccountDao accountDao = new IAccountDaoImpl();

    public IAccountServiceImpl(){
        System.err.println("执行了 IAccountServiceImpl()");
    }

    public void init() {
        System.out.println("我是 init（）方法，我执行了");
    }

    public void destroy() {
        System.out.println("我是 destory（）方法，我执行了");
    }

    @Override
    public int saveAccount() {
        return accountDao.saveAccount();
    }
}
